home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2006 May / PCWMAY06.iso / Software / Freeware / First Page 2006 3.00 / fp2006-final-3.00-setup.exe / {app} / Iscripts / Message Dialogs / blinking-text.izs < prev    next >
Text File  |  2005-09-28  |  4KB  |  181 lines

  1. <!NOWIZARD>
  2.  
  3. <!TITLE>Blinking Text 
  4. <!/TITLE>
  5.  
  6. <!DESCRIPTION> This script is a simple layer based javascript that blinks any text. The script can be used to catch the attention of the user. The blinking speed can be adjusted by the variable blink_speed. Only works in MSIE. 
  7. <!/DESCRIPTION> 
  8.  
  9. <!CATEGORY>Messages<!/CATEGORY>
  10.  
  11. <!SCRIPT>
  12. <!-- START OF SCRIPT -->
  13.  
  14. <!-- HOW TO INSTALL BLINKING TEXT:
  15.  
  16.   1.  Copy code into the HEAD section of document
  17.   2.  Put last coding into the BODY section of document  -->
  18.  
  19. <!-- STEP ONE: Add code into HEAD section of document  -->
  20.  
  21. <HEAD>
  22.  
  23. <SCRIPT LANGUAGE="JavaScript">
  24.  
  25. <!-- Original:  Premshree Pillai (premshree@hotmail.com ) -->
  26. <!-- Web Site:  http://www.qiksearch.com -->
  27. <!-- Begin
  28.  
  29. window.onerror = null;
  30.  var bName = navigator.appName;
  31.  var bVer = parseInt(navigator.appVersion);
  32.  var NS4 = (bName == "Netscape" && bVer >= 4);
  33.  var IE4 = (bName == "Microsoft Internet Explorer" 
  34.  && bVer >= 4);
  35.  var NS3 = (bName == "Netscape" && bVer < 4);
  36.  var IE3 = (bName == "Microsoft Internet Explorer" 
  37.  && bVer < 4);
  38.  var blink_speed=100;
  39.  var i=0;
  40.  
  41. if (NS4 || IE4) {
  42.  if (navigator.appName == "Netscape") {
  43.  layerStyleRef="layer.";
  44.  layerRef="document.layers";
  45.  styleSwitch="";
  46.  }else{
  47.  layerStyleRef="layer.style.";
  48.  layerRef="document.all";
  49.  styleSwitch=".style";
  50.  }
  51. }
  52.  
  53. //BLINKING
  54. function Blink(layerName){
  55.  if (NS4 || IE4) { 
  56.  if(i%2==0)
  57.  {
  58.  eval(layerRef+'["'+layerName+'"]'+
  59.  styleSwitch+'.visibility="visible"');
  60.  }
  61.  else
  62.  {
  63.  eval(layerRef+'["'+layerName+'"]'+
  64.  styleSwitch+'.visibility="hidden"');
  65.  }
  66.  } 
  67.  if(i<1)
  68.  {
  69.  i++;
  70.  } 
  71.  else
  72.  {
  73.  i--
  74.  }
  75.  setTimeout("Blink('"+layerName+"')",blink_speed);
  76. }
  77. //  End -->
  78. </script>
  79.  
  80. </HEAD>
  81.  
  82. <!-- STEP TWO: Add code into BODY section of document  -->
  83.  
  84. <BODY>
  85.  
  86. <div id="prem_hint" style="position:relative; left:0; visibility:hidden" class="prem_hint">
  87. <font color="#FF0000"><b>Welcome to Evrsoft!</b></font>
  88. </div>
  89. <script language="javascript">Blink('prem_hint');</script>
  90.  
  91.  
  92. <!-- END OF SCRIPT -->
  93. <!/SCRIPT>
  94.  
  95. <!PREVIEW>
  96. <!-- START OF SCRIPT -->
  97.  
  98.  
  99. <!-- HOW TO INSTALL BLINKING TEXT:
  100.  
  101.   1.  Copy code into the HEAD section of document
  102.   2.  Put last coding into the BODY section of document  -->
  103.  
  104. <!-- STEP ONE: Add code into HEAD section of document  -->
  105.  
  106. <HEAD>
  107.  
  108. <SCRIPT LANGUAGE="JavaScript">
  109.  
  110. <!-- Original:  Premshree Pillai (premshree@hotmail.com ) -->
  111. <!-- Web Site:  http://www.qiksearch.com -->
  112. <!-- Begin
  113.  
  114. window.onerror = null;
  115.  var bName = navigator.appName;
  116.  var bVer = parseInt(navigator.appVersion);
  117.  var NS4 = (bName == "Netscape" && bVer >= 4);
  118.  var IE4 = (bName == "Microsoft Internet Explorer" 
  119.  && bVer >= 4);
  120.  var NS3 = (bName == "Netscape" && bVer < 4);
  121.  var IE3 = (bName == "Microsoft Internet Explorer" 
  122.  && bVer < 4);
  123.  var blink_speed=100;
  124.  var i=0;
  125.  
  126. if (NS4 || IE4) {
  127.  if (navigator.appName == "Netscape") {
  128.  layerStyleRef="layer.";
  129.  layerRef="document.layers";
  130.  styleSwitch="";
  131.  }else{
  132.  layerStyleRef="layer.style.";
  133.  layerRef="document.all";
  134.  styleSwitch=".style";
  135.  }
  136. }
  137.  
  138. //BLINKING
  139. function Blink(layerName){
  140.  if (NS4 || IE4) { 
  141.  if(i%2==0)
  142.  {
  143.  eval(layerRef+'["'+layerName+'"]'+
  144.  styleSwitch+'.visibility="visible"');
  145.  }
  146.  else
  147.  {
  148.  eval(layerRef+'["'+layerName+'"]'+
  149.  styleSwitch+'.visibility="hidden"');
  150.  }
  151.  } 
  152.  if(i<1)
  153.  {
  154.  i++;
  155.  } 
  156.  else
  157.  {
  158.  i--
  159.  }
  160.  setTimeout("Blink('"+layerName+"')",blink_speed);
  161. }
  162. //  End -->
  163. </script>
  164.  
  165. </HEAD>
  166.  
  167. <!-- STEP TWO: Add code into BODY section of document  -->
  168.  
  169. <BODY>
  170.  
  171. <div id="prem_hint" style="position:relative; left:0; visibility:hidden" class="prem_hint">
  172. <font color="#FF0000"><b>Welcome to Evrsoft!</b></font>
  173. </div>
  174. <script language="javascript">Blink('prem_hint');</script>
  175.  
  176.  
  177. <!-- END OF SCRIPT -->
  178. <!/PREVIEW>
  179.  
  180. <!RELATED>NONE<!/RELATED>
  181.